/*
 * $Id: EtherAddress.h,v 1.3 2005-07-27 11:09:46 bacon Exp $
 */

#ifndef _XPP_NET_ETHERADDRESS_CLASS_
#define _XPP_NET_ETHERADDRESS_CLASS_

#include <xpp/net/Address.h>
#include <xpp/bas/String.h>

namespace xpp
{
	namespace net
	{

		class EtherAddress: public Address
		{
		public:
			EtherAddress ();
			EtherAddress (const xp_byte_t* addr);
			EtherAddress (const EtherAddress& addr);
			
			EtherAddress& operator= (const EtherAddress& addr);
			EtherAddress& operator= (const xp_byte_t* addr);

			int     family      () const { return -1; }
			int     type        () const { return -1; }

			addr_t* storage     () const
			{ 
				return (addr_t*)address_storage;
			}
			len_t   storageSize () const 
			{ 
				return xp_sizeof(address_storage);
			}

			xpp::bas::String toString() const;

		protected:
			// TODO: redefine this storage
			xp_byte_t address_storage[6];
		};


	}
}

#endif
